// Example store.js usage with npm
var store = require("store");
// store.set('user', { name:'Marcus' })
// store.get('user').name == 'Marcus'

const storePlugin = store => {
  store.subscribe((mutation, { todos }) => {
    window.localStorage.setItem(STORAGE_KEY, JSON.stringify(todos));
  });
};

export default [storePlugin];
